package com.iotechn.unimall.data.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.iotechn.unimall.data.domain.LeaseOrderDO;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;


/**
 *
 *
 * @author hct
 * @email 77802226@qq.com
 * @date 2020-07-21 22:35:48
 */
public interface LeaseOrderMapper extends BaseMapper<LeaseOrderDO> {

    List<LeaseOrderDO> selectDetailList(@Param("phone") String phone,
                                       @Param("orderNo")String orderNo, @Param("title") String title,
                                       @Param("landNo") String landNo, @Param("channel") String channel,
                                       @Param("status") Integer status,
                                       @Param("offset") Integer offset, @Param("limit") Integer limit);

    Long countOrder(@Param("phone") String phone,
                    @Param("orderNo")String orderNo,@Param("title") String title,
                    @Param("landNo") String landNo,@Param("channel") String channel,
                    @Param("status") Integer status);

    LeaseOrderDO selectById(@Param("id")Long id);

    LeaseOrderDO selectDetailByNo(@Param("orderNo")String orderNo);

    List<LeaseOrderDO> selectFrontListById(@Param("userId")Long id,@Param("offset") Integer offset, @Param("limit") Integer limit);

    List<LeaseOrderDO> selectExpireOrderNos(@Param("status") Integer status, @Param("time") Date time);

    Integer incRefundPrice(@Param("delta") Integer delta, @Param("orderId") Long orderId);
}
